{template '_header'}
<link rel="stylesheet" type="text/css" href="../addons/ewei_shopv2/plugin/sign/static/css/sign.css?v=2.0.0">

{if !empty($set['maincolor']) && $set['maincolor']!='#24b2f4'}
    <style>
        .member-page .headinfo,
        .advaward .body .award-body .item .iconn.candraw,
        .btn.btn-warning.btn-know {background: {$set['maincolor']};}
        .calendar .title,
        .select-date,
        .advaward .body .award-body .item .days.candraw,
        .advaward .body .award-body .item .text.candraw,
        .calendar .body .week .day .signed {color: {$set['maincolor']};}
        .calendar .body .week .day.today:before,
        .advaward .body .award-body .item .text.candraw {border-color: {$set['maincolor']};}
    </style>
{/if}

<div class='fui-page fui-page-current'>
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back"></a>
        </div>
        <div class="title">{$set['textcredit']}{$set['textsign']}</div>
        <div class="fui-header-right">
            <a href="{php echo mobileUrl()}" class="external">
                <i class="icon icon-home"></i>
            </a>
        </div>
    </div>
    <div class='fui-content member-page navbar'>

        <div class="headinfo">
            <a class="setbtn record" href="{php echo mobileUrl('sign/records')}" data-nocache='true'>详细记录</a>
            <div class="child">
                <div class="title">连续{$set['textsign']}</div>
                <div class="num"><span id="signorder">{$signinfo['orderday']}</span>天</div>
            </div>
            <div class="child userinfo">
                <div class="face">
                    <img src="{$member['avatar']}"/>
                </div>
                <div class="name">{$member['nickname']}</div>
                <div class="name">我的{$set['textcredit']}:<span id="credit">{php echo intval($member['credit1'])}</span>{$set['textcredit']}</div>
                <div class="level" style="padding-top: 0.2rem">
                    <div class="btn sign" id="btn-sign">{if !empty($signinfo['signed'])}今日{$set['textsigned']}{else}点击{$set['textsign']}{/if}</div>
                </div>
            </div>
            <div class="child">
                <div class="title">总{$set['textsign']}</div>
                <div class="num"><span id="signsum">{$signinfo['sum']}</span>天</div>
            </div>
        </div>

        <div class="calendar">
            <div class="title">
                <span class="date">
                    <i class="icon icon-calendar1"></i>
                    <select  id="date" class="select-date" name="date">
                        {loop $month $item}
                        <option value="{$item['year']}-{$item['month']}" {if $item['year']==$json_arr['year'] && $item['month']==$json_arr['month']}selected{/if}>{$item['year']}年{$item['month']}月</option>
                        {/loop}
                    </select>
                </span>
                {if !empty($set['sign_rule'])}
                    <span class="rule" id="signrule">{$set['textsign']}规则</span>
                {/if}
            </div>
            <div class="body" id="calendar">
                {template 'sign/calendar'}
            </div>
            {if !empty($set['signold'])}
                <div class="fui-title" style="background: #fff; margin: 0; padding-bottom: 0.5rem">提示：点击{$set['textsignforget']}日期可{$set['textsignold']}哦~</div>
            {/if}
        </div>
        <div id="advaward">
            {template 'sign/advaward'}
        </div>

        {template '_copyright'}

    </div>


    <div class="pop-rule-hidden" style="display: none;">
        <div class="verify-pop pop">
            <div class="close"><i class="icon icon-roundclose"></i></div>
            <div class="qrcode">
                <div class="inner">
                    <div class="title">{$set['textsign']}规则</div>
                    <div class="text">{$set['sign_rule']}</div>
                </div>
                <div class="inner-btn" style="padding: 0.5rem">
                    <div class="btn btn-warning btn-know">我知道了</div>
                </div>
            </div>
        </div>
    </div>



    <script language='javascript'>
        require(['../addons/ewei_shopv2/plugin/sign/static/js/index.js'],function(modal){modal.init({$json});});
    </script>
</div>
{php $this->footerMenus(null, $texts)}
{template '_footer'}